package com.yhwch.fun.controller;

import com.yhwch.fun.service.ImportInsuTableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;



/**
 * @author pengweichao
 * @date 2019/8/8
 */
@Controller
@RequestMapping("/insu")
public class ImportInsuController {
    @Autowired
    ImportInsuTableService importInsuTableService;

    @RequestMapping("/autoSplit")
    @ResponseBody
    public String auto(@RequestParam("a") int allFileCount,@RequestParam("s") int splitSize,@RequestParam("u") int useSelect){
       return importInsuTableService.autoSplitTask(0,allFileCount,splitSize,useSelect);
    }

    @RequestMapping("/seg")
    @ResponseBody
    public void segment(){
        importInsuTableService.segmentFile();
    }

}
